import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 维修查询list
export const getAllRepairMaintain = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/getAllRepairMaintain`, { params });
// 维修项目查询
export const getAllRepairLabour = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/getAllRepairLabour`, { params });

// 维修材料查询
export const getAllRepairPart = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/getAllRepairPart`, { params });
// 附加项目查询
export const getAllRepairAddItem = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/getAllRepairAddItem`, { params });
// 派工情况查询
export const getAllRepairAssign = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/getAllRepairAssign`, { params });

// 维修类型下拉框
export const getRepairTypes = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/findAllRepairType`, { params });

// 查询所有人
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
//获取所有经销商
export const getAllDealer = params => axios.get(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/byAllTranslate`, { params });

// 导出
export const factoryExportRepairHistory = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairHistory/exportExcel`, { params, responseType: 'arraybuffer' });
//下载中心导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
// 工单打印厂端接口
export const printRepairOrderOem = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repairOrder/printRepairOrderOem`, { params });
// 查询结算单打印数据
export const printSettlementRepairOrderOem = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/settlement/printSettlementRepairOrderOem`, { params });
